﻿<%@ Page Language="C#" AutoEventWireup="true" Inherits="Lebi.ERP.Bussiness.pagebase.usermoney_edit_window" validateRequest="false"%>

    <table class="table">
        
        <tr id="showuser">
            <th valign="top" style="width: 20%;">
                <%=Tag("会员账号")%>：
            </th>
            <td>
                <%=User_Name %>
                <input type="hidden" id="User_Name_To" name="User_Name_To" class="input" shop="true" min="notnull" style="width: 200px;" value="<%=User_Name %>" />
                
            </td>
        </tr>

        <tr>
            <th>
                <%=Tag("资金")%>：
            </th>
            <td style="text-align: left;">
                <%if (id > 0)
                { %>
                <%=Money%>
                <%}
                else
                { %>
                <input type="text" class="input" shop="true" name="Money" id="Money" min="notnull" value="<%=Money %>" onkeyup="value=value.replace(/[^-\d\.]/g,'');" style="width: 80px;" />
                <%} %>
            </td>
        </tr>
        <tr>
            <th style="vertical-align:top">
                <%=Tag("类型")%>：
            </th>
            <td style="text-align: left;">
                充值
                <input type="hidden" id="Type_id_MoneyType" shop="true"  name="Type_id_MoneyType" value="191" />
            </td>
        </tr>
        <tr>

            <th>
                <%=Tag("财务类别")%>：
            </th>
            <td>
                <input type="hidden" id="Money_Type_id" shop="true" name="Money_Type_id" value="1" />
                销售收款
            </td>
        </tr>

        <tr>
            <th>

                <%=Tag("转入银行")%>：

            </th>
            <td>

                <select shop="true" name="Bank_id_to" <%=model.id >0?"disabled":"" %>>
                <%=Lebi.ERP.other.BankAccountOption(moneymodel.LebiERP_bankaccount_id) %>
            </select>

            </td>
        </tr>


        <tr>
            <th style="vertical-align:top">
                <%=Tag("操作说明")%>：<br />
                <em>≤ <span id="remLen">255</span></em>
            </th>
            <td>
                <textarea name="Remark" id="Remark" shop="true" rows="3" cols="60" class="textarea" onKeyDown="checkMaxInput(this.form)" onKeyUp="checkMaxInput(this.form)" style="height: 60px;width: 400px;"><%=model.Remark%></textarea>
                <div class="tools clear">
                    <ul>
                        <li class="plus"><a href="javascript:void(0);" onclick="javascript:resizeEditor('Remark',100);"><b></b><span><%=Tag("展开")%></span></a></li>
                        <li class="minus"><a href="javascript:void(0);" onclick="javascript:resizeEditor('Remark',-100)"><b></b><span><%=Tag("收缩")%></span></a></li>
                    </ul>
                </div>
            </td>
        </tr>
        <tr>
            <td colspan="2" class="action">
                <div class="tools tools-m clear">
                    <ul>
                        <li class="submit"><a href="javascript:void(0);" onclick="SaveObj();"><b></b><span><%=Tag("提交")%></span></a></li>
                    </ul>
                </div>
                <input type="hidden" name="id" value="<%=id%>" shop=true" />
                <input type="hidden" name="mode" value="<%=mode%>" shop=true" />
            </td>
        </tr>
    </table>
    <script type="text/javascript">
    var maxLen = 255;
    var Remark = document.getElementById("Remark");
    function checkMaxInput(form) {
        if (Remark.value.length > maxLen)
            Remark.value = Remark.value.substring(0, maxLen);
        else document.getElementById("remLen").innerHTML = maxLen - Remark.value.length;
    }
    function delitem() {
        $("#User_idsList ul li[selectedElement]").remove();
        if ($("#User_idsList ul li").length == 0)
        {
            $("#User_Name_To").show();
            $("#User_Name_To").attr("min","notnull");
            $("#proBox").hide();
        }
    }
    function removeall() {
        $("#User_idsList ul li").remove();
        $("#User_Name_To").show();
        $("#User_Name_To").attr("min","notnull");
        $("#proBox").hide();
    }
    function SaveObj() {
        var postData = GetFormJsonData("shop");
        if (!CheckForm("shop", "span"))
            return false;
        //var url = "<%=site.AdminPath %>/ajax/ajax_user.aspx?__Action=UserMoney_Edit&<%=su.URL %>";
        var url = "<%=site.AdminPath %>/ajax/ajax_ex.aspx?__Action=UserMoney_Edit&<%=su.URL %>";
        RequestAjax(url,postData,function(){MsgBox(1, "<%=Tag("操作成功")%>", '?')});
    }
    </script>

  